1. The Field of the Invention
The present invention relates to character legibility. More specifically, the present invention relates to adding hinting instructions to a character in order to improve a character bitmap produced from an outline of the character at a certain size and output resolution when the character outline is scan converted.
2. Background and Related Art
FIG. 1 illustrates a character outline 100. A character outline is a mathematical description of a characters shape using lines and curves. Character outline 100 includes a feature 120 that is made up of strokes 121-126, and includes strokes 111-112 and 131-133. Identifying strokes 121-126 as feature 120 is a somewhat arbitrary designation that will be described in more detail below with respect to various embodiments of the present invention. For now, it is sufficient to understand that a feature is a collection of one or more strokes for a character.
FIG. 2 shows a bit map 200 of character outline 100 scaled to a grid of sixty pixels. Similar to character outline 100, bit map 200 includes a feature 220 that is made up of strokes 221-226, and includes strokes 211-212 and 231-233. FIG. 2 illustrates that when sufficient pixels are available for a character of a particular size, rendering can be a relatively straightforward and simple process.
Consider, however, the size of the bit map 200 on various output devices. Even the least expensive of current laser printers offer resolutions of 300 dots per inch (DPI), with 600 being more common. While uncommon for laser printers, resolutions greater than 2400 DPI are not uncommon for ink-jet printers. Accordingly, if rendered on a 300 DPI laser printer, bit map 200 would be ⅕th of an inch high.
Typical display devices, however, have much lower resolutions. For example, monitor resolutions of about 100 to 133 pixels per inch (PPI) are considered high, with resolutions of 72 PPI being fairly common. As a result, if rendered on a high resolution monitor, bit map 200 would be approximately ½ of an inch high.
It is generally accepted that the optimum reading size for characters is between about nine and twelve points. A point is approximately 1/72nd of an inch. Converting point size to inches, optimum reading size for characters is therefore about ⅛th of an inch to about ⅙th of an inch.
As indicated above, if rendered on a 300 DPI laser printer, bit map 200 would be ⅕th of an inch high, which is large for reading, but not unreasonably so. However, as also noted above, if rendered on a high resolution monitor, bit map 200 would be approximately ½ of an inch high, which is far too large for effective reading.
In order to make character outline 100 into a bit map for optimal reading on the 72 PPI monitor, character outline 100 would need to be scaled to a grid of twelve pixels, as shown in FIG. 3. On a 72 PPI monitor, bit map 300 would be ⅛th of an inch high. Note, however, that when character outline 100 is scaled to a grid of twelve pixels, there are not enough pixels to accurately represent the shape of the character.
Similar to bit map 200, bit map 300 includes a feature 320 that is made up of strokes 321-326, and includes strokes 311-312 and 331-333. As shown in FIG. 3, however, the shape of the character appears to be broken, with clashing pixels and block spots. For example, there is not white space between strokes 322 and 324A and between strokes 326 and 332.
As shown in the basic bit map 400 of FIG. 4, fourteen pixels in the vertical direction are about the minimum number required to accurately represent character outline 100, given: one pixel for the top of stroke 411, one pixel for stroke 412, one pixel for the separation between stroke 412 and 422, one pixel for stroke 422, one pixel for the separation between stroke 422 and stroke 424A, one pixel for stroke 424A, one pixel for the separation between stroke 424A and stroke 424B, one pixel for stroke 424B, one pixel for the separation between stroke 424B and 426, one pixel for stroke 426, one pixel for the separation between stroke 426 and stroke 432, one pixel for stroke 432, two pixels for strokes 431 and 433. Of course, the minimum number of pixels required to represent a character accurately varies from one character to another.
Roughly, the distance in the vertical direction from the top of the highest character to the bottom of the lowest character in a font is defined as an “em.” There also can be some padding, and some font characters may exceed an em. An em is not a unit of measure, but rather a shorthand description for this distance. The number of pixels per em is helpful in determining whether the character shape problems illustrated in FIG. 3 are likely to occur. At sixty pixels per em (FIG. 2) character shape problems are less likely to occur than at twelve pixels per em (FIG. 3).
Returning back to FIG. 4, if fourteen pixels are not available in the vertical direction, the character may be altered to improve legibility. It should be noted that although FIG. 4 shows insufficient pixels in the vertical direction, the problem of insufficient pixels to represent a character applies in the horizontal direction as well. One way to alter a character to improve legibility is to remove strokes from the character. An Asian character was selected for character outline 100 for purposes of illustration because Asian characters, as compared to Latin characters, tend to have a large number of strokes, and therefore generally are more susceptible to the shape problems, whether in the horizontal or vertical direction, illustrated in FIG. 3 at character sizes suited to effective reading. Naturally, Latin and other characters are susceptible to the same shape problems, depending on the number of strokes in the character outline, the target size for the character, resolution of the output device, and so forth.
Removing a stroke from an Asian character is roughly analogous to removing a letter from an English word. For many English words, removing a letter would not make the word unrecognizable, particularly in the context of surrounding words. Of course, certain letters have more impact than others—removing vowels in the middle of a word is likely to cause fewer problems than removing a consonant at the beginning of a word. Similarly, removing a stroke from an Asian character can reduce the number of pixels needed to represent the character, without impacting legibility in too great of a degree. Like removing letters from an English word, however, the stroke to be removed from an Asian character should be selected to minimize any potential reduction in readability.
As a result, rather than scaling the character outline 100, traditional Asian fonts include multiple bit maps, created by the font developer, for rendering characters at different font sizes. The stroke-reduced bit map 500 illustrated in FIG. 5 is an example bit map for the character outline 100 illustrated in FIG. 1. Note that strokes 124A and 124B have been collapsed into a single stroke 524 to improve legibility. The remaining strokes, 511, 512, 521, 522, 523, 526, and 531-533 are largely unchanged.
While the solution illustrated if FIG. 5 addresses the character shape problem shown in FIG. 3, providing multiple bit maps for each character significantly increases the resources required to develop an Asian font and significantly increases the storage requirements needed for the font. Consider, for example, that an Asian font may contain more than 20,000 distinct characters. In providing multiple bit maps for each character, the number of bit maps for a single Asian font may exceed 400,000. As a result, developing an Asian font may require the equivalent of 50 font designers working for a full year.
Therefore, methods, systems, and computer program products for adding hinting instructions to a character in order to improve legibility of a scaled character bitmap produced from an outline of the character at a certain size and output resolution when the character outline is scan converted.